
var i=0;

function timedCount()
{
    i=i+1;
    postMessage(i); //向 HTML 页面传回一段消息
    setTimeout("timedCount()",500);
}

timedCount();

